<?php

/**
 * storehouse actions.
 *
 * @package    WacStorehouse
 * @subpackage storehouse
 * @author     JianBinBi <prince.bi@gmail.com>
 * @version    SVN: $Id: actions.class.php 12479 2008-10-31 10:54:40Z fabien $
 */
class storehouseActions extends WacCommonActions
{
  /*
   * override filter list
   */
  public function filterList($listObjs)
  {
      $filterArr = array();
      if(count($listObjs) > 0)
      {
          foreach($listObjs as $listObj)
          {
              $tmpArr = $listObj->toArray();
              $tmpArr['factory_id']             = $listObj->getWacFactory()->getName();
              $tmpArr['customer_id']            = $listObj->getWacCustomer()->getName();
              $tmpArr['area_size_unit_code']    = $listObj->getWacAreaSizeUnit()->getName();
              $tmpArr['capacity_unit_code']     = $listObj->getWacCapacityUnit()->getName();
              $tmpArr['goods_amount_unit_code'] = $listObj->getWacGoodsAmountUnit()->getName();

              $filterArr[] = $tmpArr;
          }
      }

      return $filterArr;
  }
}